home *** CD-ROM | disk | FTP | other *** search
/ Inter.Net 55-1 / Inter.Net 55-1.iso / CBuilder / Setup / BCB / data.z / ws2tcpip.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-02-09  |  2.7 KB  |  82 lines

  1. /*
  2. **  WS2TCPIP.H - WinSock2 Extension for TCP/IP protocols
  3. **
  4. **  This file contains TCP/IP specific information for use
  5. **  by WinSock2 compatible applications.
  6. **
  7. **  To provide the backward compatibility, all the TCP/IP
  8. **  specific definitions that were included in the WINSOCK.H
  9. **  file are now included in WINSOCK2.H file. WS2TCPIP.H
  10. **  file includes only the definitions  introduced in the
  11. **  WinSock 2 Protocol-Specific Annex document.
  12. **
  13. **  Rev 0.2 Aug 10, 1995
  14. */
  15.  
  16. /*
  17.  *      C/C++ Run Time Library - Version 9.0
  18.  *
  19.  *      Copyright (c) 1997, 1998 by Borland International
  20.  *      All Rights Reserved.
  21.  *
  22.  */
  23.  
  24. #ifndef _WS2TCPIP_H_
  25. #define _WS2TCPIP_H_
  26. #pragma option push -b
  27.  
  28.  
  29.  
  30. /* Structure to keep interface specific information */
  31.  
  32. typedef struct _INTERFACE_INFO
  33. {
  34.     u_long          iiFlags;            /* Interface flags */
  35.     struct sockaddr iiAddress;          /* Interface address */
  36.     struct sockaddr iiBroadcastAddress; /* Broadcast address */
  37.     struct sockaddr iiNetmask;          /* Network mask */
  38. } INTERFACE_INFO, FAR * LPINTERFACE_INFO;
  39.  
  40. /* Possible flags for the  iiFlags - bitmask  */
  41.  
  42. #define IFF_UP           0x00000001 /* Interface is up */
  43. #define IFF_BROADCAST    0x00000002 /* Broadcast is  supported */
  44. #define IFF_LOOPBACK     0x00000004 /* this is loopback interface */
  45. #define IFF_POINTTOPOINT 0x00000008 /*this is point-to-point interface*/
  46. #define IFF_MULTICAST    0x00000010 /* multicast is supported */
  47.  
  48. /* Argument structure for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP */
  49.  
  50. struct ip_mreq {
  51.     struct in_addr imr_multiaddr;   /* IP multicast address of group */
  52.     struct in_addr imr_interface;   /* local IP address of interface */
  53. };
  54.  
  55. /* TCP/IP specific Ioctl codes */
  56.  
  57. #define SIO_GET_INTERFACE_LIST  _IOR('t', 127, u_long)  // <TBD>
  58.  
  59. /* Option to use with [gs]etsockopt at the IPPROTO_IP level */
  60.  
  61. #define IP_OPTIONS          1  /* set/get IP options */
  62. #define IP_HDRINCL          2  /* header is included with data */
  63. #define IP_TOS              3  /* IP type of service and preced*/
  64. #define IP_TTL              4  /* IP time to live */
  65. #define IP_MULTICAST_IF     9  /* set/get IP multicast i/f  */
  66. #define IP_MULTICAST_TTL    10 /* set/get IP multicast ttl */
  67. #define IP_MULTICAST_LOOP   11 /*set/get IP multicast loopback */
  68. #define IP_ADD_MEMBERSHIP   12 /* add an IP group membership */
  69. #define IP_DROP_MEMBERSHIP  13 /* drop an IP group membership */
  70. #define IP_DONTFRAGMENT     14 /* don't fragment IP datagrams */
  71.  
  72. /* Option to use with [gs]etsockopt at the IPPROTO_UDP level */
  73.  
  74. #define UDP_NOCHECKSUM      1
  75.  
  76. /* Option to use with [gs]etsockopt at the IPPROTO_TCP level */
  77.  
  78. #define TCP_EXPEDITED_1122  0x0002
  79.  
  80. #pragma option pop
  81. #endif  /* _WS2TCPIP_H_ */
  82.